import request from "@/utils/request.js"

/**
 * 员工
 */

export function staffList(data) {
	return request({
		url: '/stock-api/store_staff/list',
		method: 'GET',
		data,
	})
}

export function staffInfo(id) {
	return request({
		url: '/stock-api/store_staff/' + id,
		method: 'GET',
	})
}

export function staffDel(id) {
	return request({
		url: '/stock-api/store_staff/' + id,
		method: 'DELETE',
	})
}

export function staffSave(data, update = false) {
	return request({
		url: '/stock-api/store_staff',
		method: update ? 'PUT' : 'POST',
		data,
	})
}